//单例模式
// 1.一个类只能有一个实例；
//2.这个类可以自动化构建该实例；
//3.该类向世界提供使用该单例的接口。
function BuildController(){
	this.init();
}
// BuildController.core;
// BuildController.getBuildController() = function(){

// }

BuildController.prototype.init = function(){
	var buildBox = document.getElementById("box");
	var buildSphere = document.getElementById("sphere");
	var buildCylinder = document.getElementById("cylinder");
	var buildPlane = document.getElementById("plane");

	// buildBox.addEventListener('click',manager.addBox);
	// buildSphere.addEventListener('click',manager.addSphere);
	// buildCylinder.addEventListener('click',manager.addCylinder);
	// buildPlane.addEventListener('click',manager.addPlane);
	buildBox.addEventListener('click',function(){manager.addMesh('BoxGeometry');});
	buildSphere.addEventListener('click',function(){manager.addMesh('SphereGeometry');});
	buildCylinder.addEventListener('click',function(){manager.addMesh('CylinderGeometry');});
	buildPlane.addEventListener('click',function(){manager.addMesh('PlaneGeometry');});
	// buildCylinder.addEventListener('click',manager.addMesh('box'));
	// buildPlane.addEventListener('click',manager.addMesh('box'));PlaneGeometry

	var buildSpotLight = document.getElementById("spotLight");
	var buildPointLight = document.getElementById("pointLight");
	var buildDirectionalLight = document.getElementById("directionalLight");
	var buildAmbientLight = document.getElementById("ambientLight");

	// buildSpotLight.addEventListener('click',manager.addSpotLight);
	// buildSpotLight.addEventListener('click',manager.addSpotLight);
	buildSpotLight.addEventListener('click',function(){manager.addObjectLight('SpotLight');});
	buildPointLight.addEventListener('click',function(){manager.addMeshLight('PointLight');});
	buildDirectionalLight.addEventListener('click',function(){manager.addObjectLight('DirectionalLight');});
	buildAmbientLight.addEventListener('click',function(){manager.addMeshLight('AmbientLight');});

	// var convertToMesh = document.getElementById('convertToMesh');

	// convertToMesh.addEventListener('click', function(){ConvertToMesh.toMesh(activeObject)});

	

	// function meshEditor(){
	// 	var modifier = new Modifier(activeObject);
	// 	modifier.toMesh();
	// 	modifierViewer.addItem(modifierName);
	// }

	// function booleanOperation(){

	// }
}
